package luogu;

import java.math.BigInteger;
import java.util.Scanner;

public class A1255 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        if(n<=2)System.out.print(n);
        else{
            BigInteger a = BigInteger.valueOf(1);
            BigInteger b = BigInteger.valueOf(2);
            for(int i=3;i<=n;i++){
                BigInteger c=a.add(b);
                a=b;
                b=c;
            }
            System.out.println(b);
        }
    }
}
